package com.mo.design.pattern.behavior.duty_chain;

public class HandlerClient {

    public static void main(String[] args) {
        int value = 13;
        Handler handler1 = new Handler1();
        Handler handler2 = new Handler2();
        Handler handler3 = new Handler3();

        if (handler1.handler(value)){
            System.out.println("处理器1：执行成功");
        } else if(handler2.handler(value)) {
            System.out.println("处理器2: 执行成功");
        } else if(handler3.handler(value)) {
            System.out.println("处理器3: 执行成功");
        }

    }
}
